//
//  DrawSuccessView.m
//  beautyLamp
//
//  Created by Tam Kwok To Michael on 2017/9/28.
//  Copyright © 2017年 Tam Kwok To Michael. All rights reserved.
//

#import "DrawSuccessView.h"
#import "BLHeader.h"
@interface DrawSuccessView()
@property (weak, nonatomic) IBOutlet UILabel *tilteStateLabel;
@property (weak, nonatomic) IBOutlet UILabel *reasonLabel;

@end

@implementation DrawSuccessView

+ (instancetype)drawSuccessView {
    DrawSuccessView *view = [[[NSBundle mainBundle] loadNibNamed:@"DrawSuccessView" owner:nil options:nil] lastObject];
    return view;
}


- (void)awakeFromNib {
    [super awakeFromNib];
}

- (void)show:(UIView *)whereView animation:(BOOL)isAnimation {
    [whereView addSubview:self];
    if (isAnimation) {
        self.frame = CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight);
        [UIView animateWithDuration:0.2 animations:^{
            self.frame = [UIScreen mainScreen].bounds;
        }];
    }
}


- (IBAction)dismissView:(id)sender {
    self.frame = [UIScreen mainScreen].bounds;
    [UIView animateWithDuration:0.2 animations:^{
        self.frame = CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight);
    }];
    [self removeFromSuperview];
}


@end
